import type { ConfigEnv, UserConfig } from "vite";
import type { PluginOptions as DtsPluginOptions } from "vite-plugin-dts";
import type { CommonOptions } from "./CommonOptions";

/**
 * 库选项
 */
export interface LibraryOptions extends CommonOptions {
    /** 开启 dts 输出 */
    dts?: boolean | DtsPluginOptions;
}

export type DefineLibraryOptions = (config?: ConfigEnv) => Promise<{
    library?: LibraryOptions;
    vite?: UserConfig;
}>;

// type UserConfigFnPromise = (env: ConfigEnv) => Promise<UserConfig>;
